<?php
require_once 'DAL/PositionDAL.php';

class APIModel{
	private $DAL;
	
	public function __construct($a_DAL = null){
		if($a_DAL === NULL){
			$a_DAL = new PositionDAL();
		}
		$this->DAL = $a_DAL;
	}
	
	public function GetAll(){
		$result = $this->DAL->GetAll();
		if(empty($result)){
			return APIView::NOT_FOUND;
		}
		return $result;
	}
	
	public function GetByID($id){
		$result = $this->DAL->GetByID($id);
		if(empty($result)){
			return APIView::NOT_FOUND;
		}
		return $result;
	}
}
?>